package dispatcher.gui.event;

import dispatcher.gui.state.PersonDispatcherStateHandler;
import state.person.PersonDispatcherState;

/**
 * This class will talk attempt to initialize the local state of the GUI from messages
 * received from the person dispatcher
 * @author Caleb
 *
 */
public class PersonStatusInitializeThread extends Thread {

	private PersonDispatcherState state;
	
	/**
	 * The main constructor
	 * @param state The initial state of the person dispatcher
	 */
	public PersonStatusInitializeThread(PersonDispatcherState state){
		super("PersonStatusInitializeThread");
		this.state = state;
	}
	
	@Override
	public void run(){
		PersonDispatcherStateHandler handler = PersonDispatcherStateHandler.getInstance();
		
		handler.createInitialStatus(state);
	}
}
